Skip to content

feat(web): show TPM move control for trial licenses#1911

Merged
elibosley merged 2 commits intomainfrom
codex/tpm-trial-indicator
Mar 14, 2026
Merged

feat(web): show TPM move control for trial licenses#1911
elibosley merged 2 commits intomainfrom
codex/tpm-trial-indicator

Conversation

@elibosley
Copy link
Member

@elibosley elibosley commented Mar 14, 2026

Summary

  • keep the TPM move control visible as a TPM indicator when a flash-booted server has a TPM GUID available
  • disable the TPM move control for trial and expired-trial licenses and show purchase guidance
  • add registration component coverage for enabled flash-license behavior and blocked trial behavior

Testing

  • pnpm test -- test/components/Registration.test.ts

Work Intent

  • Direct follow-up from the current user-requested TPM validation/UX change; no separate Work Intent issue was created for this small scoped update.

Summary by CodeRabbit

  • Changes
    • "Move License to TPM" button now appears in more scenarios and is disabled during trial expiration.
  • Localization
    • Added message clarifying trials are locked to the registered GUID and require purchase to migrate; added "TPM GUID" label.
  • Tests
    • Updated tests to cover button visibility, disabled state, click behavior, and messaging across trial, expired, and pro states.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 14, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 49252aed-e005-4c61-9a03-9a846405c43e

📥 Commits

Reviewing files that changed from the base of the PR and between 065d9d9 and 5809efe.

📒 Files selected for processing (3)
  • web/__test__/components/Registration.test.ts
  • web/src/components/Registration.standalone.vue
  • web/src/locales/en.json

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


Walkthrough

The PR disables the TPM transfer button during trial/expired-trial states, updates the Registration component visibility and disabled logic, adds a contextual localization string, and updates tests (including a BrandButton mock) to reflect the new disabled behavior.

Changes

Cohort / File(s) Summary
Tests
web/__test__/components/Registration.test.ts
Updated BrandButton mock to bind disabled and only emit clicks when enabled. Expanded assertions to check TPM button visibility, disabled state, GUID text, licensing message, and that disabled buttons do not trigger actions.
Component
web/src/components/Registration.standalone.vue
Renamed showTpmTransferInfoshowTpmTransferButton; changed visibility logic (show when keyInstalled OR trial expiration and bootDeviceType is flash); added disableTpmTransferButton computed prop; conditionally render TPM GUID row, disable button binding, and show trial-disabled message.
Localization
web/src/locales/en.json
Added registration.moveLicenseToTpmTrialDisabled ("Trials are locked to the registered GUID. You can move to TPM by purchasing a license.") and registration.tpmGuid ("TPM GUID").

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A tiny switch now waits, its click held tight,
Trials keep the GUID safe through day and night,
A message appears where the button would be,
"Buy a license to set your TPM free." ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: making the TPM move control visible for trial licenses while disabling it and showing guidance messages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/tpm-trial-indicator
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Mar 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.95%. Comparing base (36c56f7) to head (5809efe).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1911   +/-   ##
=======================================
  Coverage   50.94%   50.95%           
=======================================
  Files        1023     1023           
  Lines       70542    70556   +14     
  Branches     7681     7683    +2     
=======================================
+ Hits        35941    35952   +11     
- Misses      34477    34480    +3     
  Partials      124      124           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@elibosley elibosley merged commit d00fb63 into main Mar 14, 2026
6 of 7 checks passed
@elibosley elibosley deleted the codex/tpm-trial-indicator branch March 14, 2026 20:44
@github-actions
Copy link
Contributor

This plugin has been deployed to Cloudflare R2 and is available for testing.
Download it at this URL:

https://preview.dl.unraid.net/unraid-api/tag/PR1911/dynamix.unraid.net.plg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant